package tw.edu.tku.im.maze;

import org.json.JSONException;
import org.json.JSONObject;

public class EndGameRepParser extends PacketParser {
   public static EndGameRepParser INSTANCE = new EndGameRepParser();
   
   private EndGameRepParser() { }

   @Override
   public EndGameRep parse(JSONObject jsonObj) throws JSONException {
      GameState gameState = GameState.parse(jsonObj.getJSONObject("result"));
      return new EndGameRep(gameState);
   }
   
   @Override
   public String acceptName() {
      return "endGameResponse";
   }
}
